<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
		<title>前牛新品</title>
		<link rel="shortcut icon" href="favicon.ico"/>
		<link rel="stylesheet" href="https://at.alicdn.com/t/font_694489_j25sptshv.css">
		<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
	</head>
	<body>
		<div id="app"></div>
		<script>
			if (window.__wxjs_environment === 'miniprogram'){

			}
           	else
           	{
				function setupWebViewJavascriptBridge(callback) {
			        if (window.WebViewJavascriptBridge) { return callback(WebViewJavascriptBridge); }
			        if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback); }
			        window.WVJBCallbacks = [callback];
			        var WVJBIframe = document.createElement('iframe');
			        WVJBIframe.style.display = 'none';
			        WVJBIframe.src = 'https://__bridge_loaded__';
			        document.documentElement.appendChild(WVJBIframe);
			        setTimeout(function() { document.documentElement.removeChild(WVJBIframe) }, 0)
			    }
			    setupWebViewJavascriptBridge(function(bridge) {
		    	// app调用js方法
					bridge.registerHandler('LoginSuccess', function(data, responseCallback) {
						window.localStorage.setItem('token',data.token)
						window.localStorage.setItem('uid',data.uid)
						window.localStorage.setItem('mobile',data.mobile)
						var responseData = { 'result' : true }
						responseCallback(responseData)
					})
				})
           	}
		</script>
	</body>
</html>
